//
// Created by grys on 2023-3-5
//

/**
 * in this file, we initial & clean athread environment.
 */

#include <stdio.h>
#include <arch/arch_imp.h>
#include "th_env.h"


void th_env_init() {
    int cluster_id=0;
	hthread_dev_open(cluster_id);
	hthread_dat_load(cluster_id, "th_kernel.dat");
    // int i;
    // i = athread_get_max_threads();
    // printf("max thread:%d\n", i); // todo only print in master processor.
}

void th_env_clean() {
    int cluster_id=0;
	hthread_dev_close(cluster_id);
}
